<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#boton").click(presionBoton);
});
  

function presionBoton(){
	var data = {"class":"com.onlinewebgames.comun.model.LoginDTO","password":"onlinewebgames","username":"onlinewebgames"};
	alert(data);	
	//stringify converts a JS array to a JSON string	
	var dataString = JSON.stringify(data);
	alert(dataString);
	$.get('index.php?r=LoginService/japi&action=login&mse=', dataString, showResult, "text");
}
function showResult(res){
	var obj = JSON.parse(res);
	alert ("Mesaje Respuesta: " +obj.mensaje);
}

</script>


<p><input type="button" id="boton" value="enviar"/>